Getting it to run from a desktop icon
=====================================

This file is intended to give you some idea of how to get R-Tcl/Tk stuff to run from a desktop icon. It assumes you have the packages from this website, and that you have seen the R-and-TclTk-configuration.txt file and have sucessfully got R and TclTk to run together.

I shall refer to the beta-binomial stuff now, but everything applies to all the others - just that it is easier for me to type beta-binomial.

The zip file contains:

beta-binomial.r
beta-binomial-functions.r
beta-binomial-help.txt
beta-binomial.bat

Open up RGui and check R can still find Tcl (ie library(tcltk))

then using the pull down menus make the directory with the beta-binomial package files in it the working directory - you do this via the file menu and select the change dir... item, then you can navigate via the browse button to the directory.

After changing to the directory then you need to `source' the beta-binomial.r file - you do this from the file menu and select the source R code item at the top - up pops a file list to select from - you select beta-binomial.r and off it goes opening up windows and things - then essentially you have it running.

Now you have demonstated that it runs on your machine you can get it to run from a desktop icon.

Open the directory with the beta-binomial package in it and open the file beta-binomial.bat in a text editor (notepad is good) you will notice that it says:


c:\progra~1\r\R-2.6.0\bin\rterm --slave --no-save --no-restore < beta-binomial.r

(change the 2.6.0 if your version is different!)

All this does is start R in a quiet mode and get it to run the  beta-binomial.r file - normally I would say that you need to check the:

c:\progra~1\r\R-2.6.0\bin\rterm

bit to make sure it points to rterm.exe - but I think it already does in your case - to check this open up the directory with the beta-binomial files in a file manager and double click on beta-binomial.bat you should get a small text box open then the beta-binomial stuff should start running as when you sourced it from RGui - if it works close it all down, if it doesn't then adjust the bit above to point at rterm.exe until beta-binomial will run from a double click on the beta-binomial.bat file (no need to reboot after editing this .bat file).

In the file manager right click on the beta-binomial.bat icon, this will bringup a menu - choose `create shortcut', you will see another file appearingin the directory named `shortcut to beta-binomial.bat' move this file bydragging to the desktop - right click on it - this brings up a menu -select properties - properties is a tabbed window and you can more or less alter any of the properties you like such as giving it a different name on the desktop - giving it a new icon etc. The only thing I would suggest is you go to the `shortcut' tab and near the bottom is a box saying `run' -the default behaviour is `Normal window' - change it to `Minimized' and apply the changes. Then by double clicking on your desktop icon you can seemlessly run the software. Do this for all the packages, you can probably miss out one or two of the steps such as checking they work fromRGui as one R runs TClTk it usually runs these files.

